﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Travianer.IController;

namespace Travianer.Controller.WebRequestController
{
    public class LogicController : ILogicController
    {
        public bool IsShownew(string url)
        {
            string lower = url.ToLower();
            return lower.IndexOf("shownew.php") > 0;
        }
        public bool IsLogin(string url)
        {
            string lower = url.ToLower();
            return !(lower.IndexOf("index.php") > 0
                || lower.Replace("http://", "").IndexOf("/") == -1);
        }
        public bool IsLoginForm(string url)
        {
            string lower = url.ToLower().TrimEnd('/');
            return lower.IndexOf("index.php") > 0
                || lower.Replace("http://", "").IndexOf("/") == -1;
        }
    }
}
